<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/statics/js/dept.js}" type="text/javascript"></script>
    <script th:src="@{/statics/未压缩版.js}" type="text/javascript"></script>


    <link th:href="@{/statics/layui-v2.7.6/layui/css/layui.css}" type="text/css" rel="stylesheet">
    <script th:src="@{/statics/layui-v2.7.6/layui/layui.js}" type="text/javascript"></script>

    <style>
        .search{
            border: 1px solid #CED3DA;
            background-color: #F5F7FA;
            height: 50px;
            line-height: 50px;
            margin-left: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
            color: #1e9fff;
            padding-left: 10px;
        }
        table{
            border: 1px solid #CFD2D7;
            text-align: center;
            margin-left: 10px;
            margin-top: 10px;
        }
        .t1{
            border: 1px solid #1e9fff;
            padding: 10px;
            background: #CFDFF5;
            margin-bottom: 10px;
        }
        th{
            width: 480px;
            border: 1px solid black;
            border-left: none;
            border-top: none;
            background-color:#F5F7FA ;
        }
        td{
            width: 480px;
            border: 1px solid black;
            border-left: none;
            border-bottom: none;
            margin: 0;
            padding: 0;
        }
        .selectPage{
            margin-left: 640px;
            color: #1e9fff;
            margin-top: 10px;
        }
        .f2{
            background-color: #1e9fff;
            color: white;
        }
        .f3{
            margin: 15px;
            font-size: 16px;
        }
        .f4{
            margin-left: 100px;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div class="table">
    <div class="t1"> &nbsp;&nbsp;&nbsp;&nbsp; 当前位置:部门管理 > 部门查询</div>
    <div class="fenye" th:object="${dept}">
        <div class="search">
            <form method="get" th:action="@{/dept/limit}">
                <input type="hidden" id="totalPage" th:value="*{totalPage}" >
                登录名： <input type="text" name="NAME"  th:value="${NAME}">
                <input type="submit" name="searchbutton" value="查询">
                <input type="reset" value="删除">
            </form>
        </div>

        <table>
            <tr>
                <th><input type="checkbox" name="xuanze"></th>
                <th>部门名称</th>
                <th>详细信息</th>
                <th>操作</th>
            </tr>
            <tr th:each="dept:*{data}">
                <td><input type="checkbox" name="xuanze"></td>
                <td th:text="${dept.NAME}"></td>
                <td th:text="${dept.REMARK}"></td>
                <td>
                    <a th:href="@{'/dept/toUpdate?id='+${dept.id}}">修改</a>
                    <a th:href="@{'/dept/toDel?id='+${dept.id}}">删除</a>
                </td>
            </tr>
        </table>
        <nav class="selectPage" th:if="*{totalPage>0}">

            <div class="f3">
                <span th:if="*{currentPageNo>1}">
                     <a href="/dept/limit?currentPageNo=1">首页</a>
                    <a th:href="@{'/dept/limit?currentPageNo='+*{currentPageNo - 1}}">上一页</a>
                </span>
                <span th:if="*{currentPageNo<totalPage}">
                    <a th:href="@{'/dept/limit?currentPageNo='+*{currentPageNo + 1}}">下一页</a>
                    <a th:href="@{'/dept/limit?currentPageNo='+*{totalPage}}">尾页</a>
                </span>

                <span th:text="'&nbsp;&nbsp;'+${dept.currentPageNo}+'&nbsp;&nbsp;'" class="f2"></span>
                <span>
                   跳转到 &nbsp;&nbsp; <input type="text" name="count" id="aa"  style="width: 50px">页&nbsp;&nbsp;<input type="button" value="确定" id="go">
                </span>
            </div>

            <div class="f4">

                共<span th:text="${dept.totalPage}"></span>页,
                共<span th:text="${dept.totalConut}"></span>条记录
            </div>
        </nav>
    </div>

</div>
</body>
</html>